-- GENERATED SPELL FOR [Phasing Sorcerer] --


function spell0_18558(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(15744,pUnit)
pUnit:RegisterEvent('Sorts_18558', 6282, 1)
end

function spell1_18558(pUnit, Event) --@Blast Wave,Self--
pUnit:FullCastSpellOnTarget(22424,pUnit)
pUnit:RegisterEvent('Sorts_18558', 6267, 1)
end

function spell2_18558(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(12466,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18558', 3000, 1)
end

function spell3_18558(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(17290,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18558', 3000, 1)
end

function spell4_18558(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15043,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18558', 7000, 1)
end

function spell5_18558(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15530,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18558', 7000, 1)
end

function Sorts_18558(pUnit, Event)
local choix_sorts_18558 = math.random(0, 5)
if choix_sorts_18558 == 0 then
pUnit:RegisterEvent('spell0_18558', 1, 1)
end
if choix_sorts_18558 == 1 then
pUnit:RegisterEvent('spell1_18558', 1, 1)
end
if choix_sorts_18558 == 2 then
pUnit:RegisterEvent('spell2_18558', 1, 1)
end
if choix_sorts_18558 == 3 then
pUnit:RegisterEvent('spell3_18558', 1, 1)
end
if choix_sorts_18558 == 4 then
pUnit:RegisterEvent('spell4_18558', 1, 1)
end
if choix_sorts_18558 == 5 then
pUnit:RegisterEvent('spell5_18558', 1, 1)
end
end

function mob18558_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18558', math.random(1500, 3000), 1)
end

function mob18558_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18558_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18558_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18558, 1, 'mob18558_Action')
RegisterUnitEvent(18558, 2, 'mob18558_Leave')
RegisterUnitEvent(18558, 3, 'mob18558_Kill')
RegisterUnitEvent(18558, 4, 'mob18558_Die')
